Skip to main content

Spring Boot project introduces dependencies and reports an error: Cannot resolve plugin org.apache.maven.plugins:maven-deploy-plugin:3.1.1

1. Error message:

Cannot resolve plugin org.apache.maven.plugins:maven-install-plugin:3.1.1

Try to run Maven import with -U flag (force update snapshots)

Error SpringBoot version:

    <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

2. Solution

Lower the SpringBoot version:

    <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.9</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>